﻿using Magicodes.ExporterAndImporter.Core;
using Microsoft.EntityFrameworkCore.Metadata.Internal;
using Newtonsoft.Json;
using Org.BouncyCastle.Crypto;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Text;

namespace NP.BPMReportPlatform.HYT.Dto
{
    public class HYTCHDto
    {
        /// <summary>
        /// 唯一ID
        /// </summary>
        public Guid Id { get; set; }

        /// <summary>
        /// 流程实例编号
        /// </summary>
        [ExporterHeader("流程编号")]
        public string InstanceNumber { get; set; }

        /// <summary>
        /// 添加时间
        /// </summary>
        public DateTime AddTime { get; set; }
        [ExporterHeader("添加时间")]
        public string AddTimeStr { get; set; }

        /// <summary>
        /// 添加用户名称
        /// </summary>
        [ExporterHeader("添加人")]
        public string AddUserName { get; set; }

        /// <summary>
        /// 工厂
        /// </summary>
        [ExporterHeader("工厂")]
        public string Factory { get; set; }

        /// <summary>
        /// 原回用桶收货申请号
        /// </summary>
        [ExporterHeader("原回用桶收货申请号")]
        public string OriginNumber { get; set; }

        /// <summary>
        /// 是否同步
        /// </summary>
        public bool IsSync { get; set; }
        [ExporterHeader("是否同步")]
        public string IsSyncStr { get; set; }

        /// <summary>
        /// 同步结果
        /// </summary>
        [ExporterHeader("同步结果")]
        public string SyncResult { get; set; }

        /// <summary>
        /// 是否同步成功
        /// </summary>
        public bool SyncSuccess { get; set; }
        [ExporterHeader("是否同步成功")]
        public string SyncSuccessStr { get; set; }

        /// <summary>
        /// 状态 0非在途 1在途
        /// </summary>
        public int Status { get; set; }
        [ExporterHeader("是否在途")]
        public string StatusStr { get; set; }

        /// <summary>
        /// 同步次数
        /// </summary>
        [ExporterHeader("同步次数")]
        public int SyncCount { get; set; }

        /// <summary>
        /// 同步时间
        /// </summary>
        public DateTime? SyncTime { get; set; }
        [ExporterHeader("同步时间")]
        public string SyncTimeStr { get; set; }

        /// <summary>
        /// 出货类型 退货、取消收货
        /// </summary>
        [ExporterHeader("出货类型")]
        public string OutType { get; set; }

        /// <summary>
        /// 采购订单号
        /// </summary>
        [ExporterHeader("采购订单号")]
        public string PurchaseOrder { get; set; }

        [IEIgnore(IsExportIgnore = true)]
        public string Url { get; set; }

        /// <summary>
        /// 流程状态
        /// </summary>
        [ExporterHeader("流程状态")]
        public string OrderStatus { get; set; }
    }

    public class GetBucketOutStockDetailDto
    {
        /// <summary>
        /// 唯一ID
        /// </summary>
        public Guid Id { get; set; }

        /// <summary>
        /// 流程实例编号
        /// </summary>
        public string InstanceNumber { get; set; }

        /// <summary>
        /// 工厂
        /// </summary>
        public string Factory { get; set; }

        /// <summary>
        /// 出货类型 退货、取消收货
        /// </summary>
        public string OutType { get; set; }

        /// <summary>
        /// 回用桶号
        /// </summary>
        public string BucketNumber { get; set; }

        /// <summary>
        /// 回用桶名称
        /// </summary>
        public string BucketName { get; set; }

        /// <summary>
        /// 批次
        /// </summary>
        public string BatchNumber { get; set; }

        /// <summary>
        /// 库位
        /// </summary>
        public string Inventory { get; set; }

        /// <summary>
        /// 现有回用桶数量
        /// </summary>
        public decimal? Quantity { get; set; }

        /// <summary>
        /// 出货数量
        /// </summary>
        public decimal? OutQuantity { get; set; }

        /// <summary>
        /// 单位
        /// </summary>
        public string Unit { get; set; }

        /// <summary>
        /// 量纲
        /// </summary>
        public string Dimension { get; set; }

        /// <summary>
        /// 供应商号
        /// </summary>
        public string SupplierCode { get; set; }

        /// <summary>
        /// 供应商名称
        /// </summary>
        public string SupplierName { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }
    }

    public class HYTSHDto
    {
        /// <summary>
        /// 唯一ID
        /// </summary>
        public Guid Id { get; set; }

        /// <summary>
        /// 流程实例编号
        /// </summary>
        [ExporterHeader("流程编号")]
        public string InstanceNumber { get; set; }

        /// <summary>
        /// 添加时间
        /// </summary>
        public DateTime AddTime { get; set; }
        [ExporterHeader("添加时间")]
        public string AddTimeStr { get; set; }

        /// <summary>
        /// 添加用户名称
        /// </summary>
        [ExporterHeader("添加人")]
        public string AddUserName { get; set; }

        /// <summary>
        /// 工厂
        /// </summary>
        [ExporterHeader("工厂")]
        public string Factory { get; set; }

        /// <summary>
        /// 采购订单号
        /// </summary>
        [ExporterHeader("采购订单号")]
        public string OrderNumber { get; set; }

        /// <summary>
        /// 是否同步
        /// </summary>
        public bool IsSync { get; set; }
        [ExporterHeader("是否同步")]
        public string IsSyncStr { get; set; }

        /// <summary>
        /// 同步结果
        /// </summary>
        [ExporterHeader("同步结果")]
        public string SyncResult { get; set; }

        /// <summary>
        /// 是否同步成功
        /// </summary>
        public bool SyncSuccess { get; set; }
        [ExporterHeader("是否同步成功")]
        public string SyncSuccessStr { get; set; }

        /// <summary>
        /// 状态 0非在途 1在途
        /// </summary>
        public int Status { get; set; }
        [ExporterHeader("是否在途")]
        public string StatusStr { get; set; }

        /// <summary>
        /// 同步次数
        /// </summary>
        [ExporterHeader("同步次数")]
        public int SyncCount { get; set; }

        /// <summary>
        /// 同步时间
        /// </summary>
        public DateTime? SyncTime { get; set; }
        [ExporterHeader("同步时间")]
        public string SyncTimeStr { get; set; }

        [IEIgnore(IsExportIgnore = true)]
        public string Url { get; set; }

        /// <summary>
        /// 流程状态
        /// </summary>
        [ExporterHeader("流程状态")]
        public string OrderStatus { get; set; }
    }
}
